﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ExtAspNet;

namespace HY.WEB.SA
{
    public partial class zj_view : PageBase
    {
        public string us, whe = "", path = "";           
        protected void Page_Load(object sender, EventArgs e)
        {
            us = Session["ID"].ToString();
            if (!IsPostBack)
            {
                if (!String.IsNullOrEmpty(Request["sid"]))
                {
                     hidsid.Text = Request["sid"].Trim();                
                }
                if (!String.IsNullOrEmpty(Request["zbh"]))
                {
                    hidsid.Text = Request["zbh"].Trim();
                    hidsid.Text = BLL.Bllbase.get_val("ZJ", "sid", "zbh='" + hidsid.Text + "'");
                }

                BindText(hidsid.Text);
            }

        
        }


        void BindText(string sid)
        {
            BLL.SC.zhongjie jbs = new BLL.SC.zhongjie();
 
            DataTable dt = jbs.GetList("sid=" + sid).Tables[0];

            if (dt.Rows.Count > 0)
            {
                hidsid.Text = dt.Rows[0]["sid"].ToString();
                hidbh.Text = dt.Rows[0]["zbh"].ToString();

                zname.Text = dt.Rows[0]["zname"].ToString();
                zaddress.Text = dt.Rows[0]["zaddress"].ToString();

                sales.Text = dt.Rows[0]["sales"].ToString();
                area.Text = dt.Rows[0]["area"].ToString();


                person.Text = dt.Rows[0]["person"].ToString();
                tel.Text = dt.Rows[0]["tel"].ToString();

                fax.Text = dt.Rows[0]["fax"].ToString();
                QQ.Text = dt.Rows[0]["QQ"].ToString();
                email.Text = dt.Rows[0]["email"].ToString();

            }

        }
       

    }
}